# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1153.67.11 -> 1.1153.67.12 # arch/ia64/kernel/acpi.c 1.48 -> 1.49 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/08/29 davej@redhat.com 1.1153.1.128 # [AGPGART] Fix indentation. # -------------------------------------------- # 03/08/28 bjorn.helgaas@hp.com 1.1153.67.12 # [PATCH] ia64: clean up acpi_boot_init() # # I was confused about this bit # of code in acpi_boot_init(): # # smp_boot_data.cpu_count = available_cpus; # if (available_cpus == 0) { # printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n"); # available_cpus = 1; /* We've got at least one of these, no? */ # } # # smp_build_cpu_map(); # # because it first saves available cpus in smp_boot_data, then potentially # modifies available_cpus. This looked at first like a bug, but I think # actually works out correctly, because smp_boot_data.cpu_count is only # used in smp_build_cpu_map(), and if cpu_count is zero, it prevents us # from looking at smp_boot_data.cpu_phys_id[0], which hasn't been # initialized. # # This should only happen with really buggy firmware, so I'm not even # sure it's worth doing more than panicking, but if we're going to deal # with it, I propose the following patch to avoid even the appearance # of a bug. This just does what acpi_parse_lsapic() would have done # if the firmware tables were correct. # -------------------------------------------- # diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c --- a/arch/ia64/kernel/acpi.c Tue Sep 9 01:04:55 2003 +++ b/arch/ia64/kernel/acpi.c Tue Sep 9 01:04:55 2003 @@ -603,11 +603,13 @@ printk(KERN_ERR PREFIX "Can't find FADT\n"); #ifdef CONFIG_SMP - smp_boot_data.cpu_count = available_cpus; if (available_cpus == 0) { printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n"); + printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id()); + smp_boot_data.cpu_phys_id[available_cpus] = hard_smp_processor_id(); available_cpus = 1; /* We've got at least one of these, no? */ } + smp_boot_data.cpu_count = available_cpus; smp_build_cpu_map(); # ifdef CONFIG_NUMA